#include<iostream>
using namespace std;
const int N = 1e3 + 10;
typedef long long LL;
int arr[N][N];
LL sum[N][N];
int n, m;
int c;
int main()
{
	cin >> n >> m >> c;
	for (int i = 1; i <= n; i++) {
		for (int j = 1; j <= m; j++) {
			cin >> arr[i][j];
			sum[i][j] = (LL)arr[i][j] + sum[i - 1][j] + 
				sum[i][j - 1] - sum[i - 1][j - 1];
		}
	}
	LL ma = -1e10;
	int x = 1, y = 1;
	/*for (int i = 1; i + c <= n; i++) {
		for (int j = 1; j + c <= m; j++) {
			int k = sum[i + c - 1][j + c - 1] - sum[i - c + 1][j] - 
				sum[i][j - c + 1] + sum[i - c + 1][j - c + 1];
			if (ma < k) {
				x = i;
				y = j;
				ma = k;
			}
		}
	}*/
	for (int i = c; i <= n; i++) {
		for (int j = c; j <= m; j++) {
			int k = sum[i][j] - sum[i][j - c] - sum[i - c][j] + sum[i - c][j - c];
			if (ma < k) {
				x = i;
				y = j;
				ma = k;
			}
		}
	}
	cout << x - c + 1 << " " << y - c + 1 << endl;
	return 0;
}